/***************************************
 *File name: Student.c                 *
 *Author: Gu Zhengxiong                *
 *Version: 2013.11.22.2                *
 *Description:The file implements      *
 *functions in STUDENT.                *
 ***************************************/

# include <stdio.h>
# include <stdlib.h>

# include "StudentInfo.h"
# include "StudentGrade.h"
# include "Student.h"

void
Display (PSTUDENT ps)
{
	
	printf ("      STUDENT'S INFORMATION\n");
	printf ("      NAME: %s\n", ps->pi->name);
	printf ("      NUMBER: %s\n", ps->pi->number);
	printf ("      AGE: %d\n", ps->pi->age);
	printf ("      STUDENT'S GRADE\n");
	printf ("      MATHS: %lf\n", ps->pg->maths);
	printf ("      CLANG: %lf\n", ps->pg->clang);
	printf ("      ENGLISH: %lf\n", ps->pg->english);
}
void
DestroyPs (PSTUDENT ps_before)
{
	free (ps_before->pnext->pg);
	free (ps_before->pnext->pi);
	ps_before->pnext = ps_before->pnext->pnext;
}